Method and device to provide arithmetic decoding of scalable BSAC audio data

ABSTRACT

A method and device to arithmetically decode scalable bit sliced arithmetic coding (BSAC) audio data are provided. The arithmetic decoding method includes checking whether all side information of a last layer of the BSAC audio data is to be decoded, and performing BSAC smart decoding and terminating the decoding when all the side information of the last layer is not decoded, and terminating decoding of the last layer when all the side information of the last layer is decoded. The BSAC smart decoding includes checking whether a symbol to be decoded is determined regardless of data read after the truncated bitstream, continuing the decoding when decoding can be performed regardless of data read after the truncated bitstream, and determining that ambiguity occurs and terminating the decoding, when the symbol to be decoded is determined dependent on the data read after the truncated bitstream. Accordingly, byte level scalability can be provided in a MPEG-4 BSAC decoder. Even though the bitstream is truncated, the decoding termination time can be known, and additional decoding with respect to a truncated portion of the bitstream can be performed.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application claims priority under 35 U.S.C. §119(a) from KoreanPatent Application No. 10-2005-0093906, filed on Oct. 6, 2005, in theKorean Intellectual Property Office, the disclosure of which isincorporated herein in its entirety by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present general inventive concept relates to scalable audio datadecoding, and more particularly, to a method and device to providearithmetic decoding of scalable bit sliced arithmetic coded (BSAC) audiodata.

2. Description of the Related Art

Audio lossless encoding is frequently used for audio broadcasting orarchiving. Lossless audio encoding is generally performed using anentropy coder using a time/frequency transformation or linearprediction.

When scalability is used in bitstream re-parsing, a bitstreamcorresponding to one frame may be truncated at any location at a serverlevel and transmitted to a decoder. Accordingly, it is difficult todecode scalable bitstreams which have been truncated.

FIG. 1 is a flowchart illustrating a conventional arithmetic decodingmethod. First, initialization is performed (operation 100), and then asearch is performed for a symbol to be decoded (operation 110). Aprobability of the symbol is calculated using a context (operation 120),and arithmetic decoding is performed (operation 130). Then, it ischecked whether the symbol is the end of a bitstream (operation 140).When the symbol is determined not to be the end of the bitstream, theaforementioned operations are repeated to search for the symbol to bedecoded, and when the symbol is determined to be the end of thebitstream, decoding is completed. In the arithmetic decoding, an entiresymbol to be decoded or a predetermined bitstream length should beknown, or a decoder is provided with information on when to terminatethe decoding by inserting a specific termination code. However, asillustrated in FIG. 2, when the bitstream is truncated, since theinformation is truncated, the symbol or the termination code cannot befound and the decoder does not know when to terminate the decoding.Thus, undesired data may be decoded.

Bit Sliced Arithmetic Coding (BSAC) is a popular Moving Picture ExpertsGroup (MPEG)-4 standard for scalable audio coding which is used widelyin digital audio (e.g., digital audio streaming or audio on demand),internet streaming, and Digital Media Broadcasting (DMB). MPEG-4 BSACoffers good sound quality at bit rates between 40 kbps to 64 kbps, butallows for degradation at lower bit rates. In MPEG-4 BSAC, the abovetruncation problem is even more severe since scalability with units of 1kbps/ch (i.e., 1 kbps/mono or 2 kbps/stereo) is provided using sideinformation. This results in poor decoding efficiency, especially atlower bit rates.

SUMMARY OF THE INVENTION

The present general inventive concept provides a method and device toarithmetically decode scalable BSAC data in which decoding isefficiently terminated without a decoding error.

Additional aspects and advantages of the present general inventiveconcept will be set forth in part in the description which follows and,in part, will be obvious from the description, or may be learned bypractice of the general inventive concept.

The foregoing and/or other aspects of the present general inventiveconcept may be achieved by providing a method of arithmetic decoding ofscalable bit sliced arithmetic coding (BSAC) audio data, the methodincluding checking whether all side information of a last layer of theBSAC audio data is decoded, and performing BSAC smart decoding andterminating the decoding when all the side information of the last layeris decoded, and terminating the decoding of the last layer when all theside information of the last layer is not decoded. The BSAC smartdecoding may include checking whether a symbol to be decoded can bedetermined regardless of data read after a truncated bitstream,continuing the decoding when the decoding can be performed regardless ofthe data read after the truncated bitstream, and determining thatambiguity occurs and terminating the decoding, when the symbol to bedecoded is determined to be dependent on the data read after thetruncated bitstream.

Determining that the ambiguity occurs and terminating decoding mayinclude determining that the ambiguity occurs when the symbol to bedecoded is determined depending on the data read after the truncatedbitstream, and setting the previously decoded sample to 0 andterminating the decoding when it is determined that the ambiguity occurswith respect to a sign bit.

The BSAC smart decoding in the performing BSAC smart decoding andterminating the decoding may include performing arithmetic decodingusing a symbol to be decoded and a probability of the symbol, decodingthe symbol into 1 by calculating K and determining whether K is equal toor greater than 2^(dummy)−1, wherein K is equal to right side values ofInequalities 1 and 2, K, and otherwise, decoding the symbol into 0 whenK is equal to or less than 0,

$\begin{matrix}{{v\; 2} < {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 1} \\{{v\; 2} \geq {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 2}\end{matrix}$

wherein, v1 is a valid bitstream value remaining after truncation, v2 isa bitstream value truncated after truncation, dummy is a number of bitsof v2, freq is a probability value of the symbol, high and low are upperand lower ends of a range in which the probability value of the symbolexists, and stopping decoding by determining that the ambiguity occurswhen K is between 0 and 2^(dummy)−1.

Before the checking whether all of the side information of the lastlayer of the BSAC audio data is to be decoded may further includecalculating a number of available layers of the BSAC audio data byreferring to a target bitrate, and checking whether a BSAC audio datalayer to be decoded is the last layer and performing BSAC arithmeticdecoding when the BSAC audio data layer to be decoded is not the lastlayer.

The foregoing and/or other aspects of the present general inventiveconcept may also be achieved by providing a device to arithmeticallydecode scalable BSAC audio data, the device including a side informationchecker to check whether all side information of a last layer of BSACaudio data is decoded, a smart decoder to perform BSAC smart decodingand to terminate the decoding when all the side information of the lastlayer is decoded, and a decoding terminator to terminate decoding of thelast layer when all the side information of the last layer is notdecoded.

The smart decoder may continue the BSAC smart decoding when the symbolto be decoded can be decoded regardless of data read after the truncatedbitstream by checking whether the symbol to be decoded is determinedregardless of the data read after the truncated bitstream, andotherwise, terminates BSAC smart decoding by determining that anambiguity occurs when the symbol to be decoded is determined to bedependent on the data read after the truncated bitstream.

The smart decoder may include a symbol decoder to perform arithmeticdecoding using the symbol to be decoded and a probability of the symbol,an ambiguity checker to check whether an ambiguity occurs by calculatingK, wherein K is equal to right side values of Inequalities 1 and 2,

$\begin{matrix}{{v\; 2} < {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 1} \\{{v\; 2} \geq {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 2}\end{matrix}$

an additional decoder to decode the symbol into 1, when K is equal to orgreater than 2^(dummy)−1, and otherwise, decoding the symbol into 0,when K is equal to or less than 0, and a decoding stopper to stop thedecoding by determining that the ambiguity occurs, when K is between 0and 2^(dummy)−1.

The decoding stopper may determine that the ambiguity occurs, when K isbetween 0 and 2^(dummy)−1, and sets a previously decoded sample to 0.

The BSAC audio data arithmetic decoding device may further include alayer number calculator to calculate a number of available layers of theBSAC audio data by referring to a target bitrate, a last layer checkerto check whether the BSAC audio data layer to be decoded is the lastlayer, and a BSAC arithmetic decoder to perform BSAC arithmetic decodingwhen the BSAC audio data layer is not the last layer based on thechecking result.

The foregoing and/or other aspects of the present general inventiveconcept may also be achieved by providing a method of arithmeticallydecoding scalable BSAC (bit sliced arithmetic coding) audio data, themethod including calculating a number of layers of the BSAC audio databased on a target bit rate, determining whether a BSAC audio data layerto be decoded is a last layer and performing BSAC arithmetic decodingwhen the BSAC audio data layer to be decoded is not the last layer,checking whether all side information of a last layer of the BSAC audiodata is decoded when the BSAC audio data layer to be decoded isdetermined to be the last layer, and performing BSAC smart decoding andthen terminating the decoding when all the side information of the lastlayer is decoded, otherwise terminating the decoding of the last layerwhen all the side information of the last layer is not decoded.

The performing the BSAC smart decoding may include arithmeticallydecoding a symbol of the BSAC audio data, determining a probability ofthe symbol, determining if an ambiguity occurs in the arithmeticallydecoded symbol based on the probability of the symbol, stopping decodingif an ambiguity is determined to occur, and determining a symbol valueto be 1 or 0 if an ambiguity is determined not to occur.

The foregoing and/or other aspects of the present general inventiveconcept may also be achieved by providing a method of decoding abitstream of BSAC (bit sliced arithmetic coding) audio data, the methodincluding determining whether all side information of the bitstream ofBSAC audio data is decoded, smart decoding the bitstream of BSAC audiodata when all the side information is decoded, the smart decodingincluding arithmetically decoding a symbol of the bitstream, determininga probability of the symbol, determining if an ambiguity occurs in thearithmetically decoded bitstream symbol based on the probability of thesymbol, stopping decoding if an ambiguity is determined to occur, anddetermining a bitstream symbol value if an ambiguity is determined notto occur.

The foregoing and/or other aspects of the present general inventiveconcept may also be achieved by providing a computer-readable recordingmedium having embodied thereon a computer program to execute a method ofarithmetic decoding of scalable BSAC (bit sliced arithmetic coding)audio data, the method including checking whether all side informationof a last layer of the BSAC audio data is decoded, and performing BSACsmart decoding and terminating the decoding when all the sideinformation of the last layer is decoded, and terminating the decodingof the last layer when all the side information of the last layer is notdecoded, wherein the BSAC smart decoding includes checking whether asymbol to be decoded can be determined regardless of data read after atruncated bitstream, continuing decoding when decoding can be performedregardless of the data read after the truncated bitstream, anddetermining that an ambiguity occurs and terminating the decoding, whenthe symbol to be decoded is determined to be dependent on the data readafter the truncated bitstream.

The foregoing and/or other aspects of the present general inventiveconcept may also be achieved by providing a computer-readable recordingmedium having embodied thereon a computer program to execute a method ofdecoding of BSAC (bit sliced arithmetic coding) audio data, the methodincluding calculating a number of layers of the BSAC audio data based ona target bit rate, determining whether a BSAC audio data layer to bedecoded is a last layer and performing BSAC arithmetic decoding when theBSAC audio data layer to be decoded is not the last layer, checkingwhether all side information of a last layer of the BSAC audio data isdecoded when the BSAC audio data layer to be decoded is determined to bethe last layer, and performing BSAC smart decoding and terminating thedecoding when all the side information of the last layer is decoded, andterminating the decoding of the last layer when all the side informationof the last layer is not decoded.

BRIEF DESCRIPTION OF THE DRAWINGS

These and/or other aspects and advantages of the present generalinventive concept will become apparent and more readily appreciated fromthe following description of the embodiments, taken in conjunction withthe accompanying drawings of which:

FIG. 1 is a flowchart illustrating a conventional arithmetic decodingmethod;

FIG. 2 illustrates bitstream truncation for general scalability;

FIG. 3 illustrates pseudo code for conventional binary arithmeticdecoding;

FIG. 4 illustrates values input into a buffer in a vicinity of atruncation point when a bitstream is truncated;

FIG. 5 is a block diagram illustrates a structure of a device toarithmetically decode scalable BSAC audio data according to anembodiment of the present general inventive concept;

FIG. 6 is a block diagram illustrating a detailed structure of a smartdecoder of FIG. 5;

FIG. 7 is a flowchart illustrating a method for arithmetic decoding ofBSAC scalable audio data according to another embodiment of the presentgeneral inventive concept;

FIG. 8 is a flowchart illustrating an example of BSAC smart decoding ofoperation 750 of FIG. 7;

FIG. 9 illustrates an example in which additional decoding is performedby using a method of determining whether arithmetic decoding of ascalable BSAC bitstream is continuously performed or terminated; and

FIG. 10 illustrates an example of a process for the case when anambiguity occurs in a sign bit.

DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

Reference will now be made in detail to the embodiments of the presentgeneral inventive concept, examples of which are illustrated in theaccompanying drawings, wherein like reference numerals refer to the likeelements throughout. The embodiments are described below in order toexplain the present general inventive concept by referring to thefigures.

FIG. 3 illustrates pseudo code used in conventional binary arithmeticdecoding. According to the pseudo code illustrated in FIG. 3, at first,a symbol decoded by using current high or low frequency values isdetermined, and then the high or low frequency values are rescaled andupdated.

FIG. 4 illustrates values input into a buffer in a vicinity of atruncation point when a bitstream is truncated. Since meaningfulinformation does not exist anymore in the bitstream located after atruncated buffer index, values allocated to the bitstream after thetruncated buffer index are meaningless values. Here, the meaninglessvalues are referred to as v2 bits, and values allocated to the rest ofthe buffers are referred to as v1 bits. In the present example, a v2 bit(dummy bit) has a value of 3, and the values of the v1 bits range from 0to 7.

FIG. 5 is a block diagram illustrating a structure of a device toarithmetically decode scalable BSAC audio data according to anembodiment of the present general inventive concept. The BSAC arithmeticdecoding device includes a last layer side information checker 530, asmart decoder 540, and a decoding terminator 550.

The BSAC arithmetic decoding device may further include a layer numbercalculator 500, a last layer checker 510, and a BSAC arithmetic decoder520. The layer number calculator 500 calculates a number of availablelayers of BSAC audio data by referring to a target bitrate.

The last layer checker 510 checks whether a layer of the BSAC audio datato be decoded is a last layer. The BSAC arithmetic decoder 520 performsBSAC arithmetic decoding when the layer of the BSAC audio data to bedecoded is not the last layer according to a checking result. The lastlayer side information checker 530 checks whether all the sideinformation of the last layer of the BSAC audio data is decoded. Thesmart decoder 540 performs BSAC smart decoding and then terminates thedecoding when all the side information of the last layer is decoded.

When the smart decoder 540 performs BSAC smart decoding usinginformation to be read after a truncation point of the truncatedbitstream, it is checked whether a symbol to be decoded can bedetermined regardless of data read after the truncated bitstream. Whendecoding can be performed regardless of the data read after thetruncated bitstream, the decoding is continued. When the symbol to bedecoded can only be determined depending on the data read after thetruncated bitstream, it is determined that an ambiguity occurs and thedecoding is terminated.

The decoding terminator 550 terminates the decoding of the last layerwhen all the side information of the last layer is not decoded.

FIG. 6 is a block diagram illustrating a detailed structure of the smartdecoder 540 of FIG. 5. The smart decoder 540 includes a symbol decoder600, an ambiguity checker 620, an additional decoder 640, and a decodingstopper 660.

The symbol decoder 600 performs arithmetic decoding by using a symboland a probability of the symbol to be decoded. If right sides ofInequalities 1 and 2, provided below are equal to K, the ambiguitychecker 620 checks whether an ambiguity occurs by calculating K. Theadditional decoder 640 decodes the symbol into 1 when K is equal to orgreater than 2^(dummy)−1. The additional decoder 640 decodes the symbolinto 0 when K is equal to or less than 0.

$\begin{matrix}{{v\; 2} < {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 1} \\{{v\; 2} \geq {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 2}\end{matrix}$

In Inequalities 1 and 2, v1 is a valid bitstream value remaining aftertruncation occurs, v2 is a bitstream value that has been truncated aftertruncation occurs, “dummy” is a number of bits of the value v2, freq isa probability value of the symbol, and high and low are upper and lowerends, respectively, of a range in which the probability value of thesymbol exists.

Hereinafter, Inequalities 1 and 2 will be described in detail. Referringback to FIG. 3, decoding inequalities of the pseudo code illustrated inFIG. 3 are rearranged with respect to the bitstream values v1 and v1expressed in Inequalities 1 and 2, respectively.

If (v1+v2−low+1)×2¹⁴<(high−low+1)×freq, the symbol is decoded into 1.The aforementioned inequality becomes Inequality 1 by transposition withrespect to the value v2.

In addition, if (v1+v2−low+1)×2¹⁴≧(high−low+1)×freq, the symbol isdecoded into 0. The aforementioned inequality becomes Inequality 2 bytransposition with respect to the value v2.

In Inequality 1, the symbol is decoded into 1, regardless of the valuev2, when the right side of Inequality 1 is greater than 7. In Inequality2, the symbol is decoded into 0, regardless of the value v2, when K isless than 0. Otherwise, a decoding ambiguity occurs, and the decoding isterminated.

When the value K is between 0 and 2^(dummy)−1, the decoding stopper 660determines that the ambiguity occurs and stops the decoding.Particularly, for a sign bit, when the value K is between 0 and2^(dummy)−1, it is determined that the ambiguity occurs, and thepreviously decoded sample is set to 0.

A sign bit on a bitplane is decoded as follows. In MPEG-4 BSAC bitstreamdecoding, a first non-zero sample among values on the bitplane isdecoded, and then, a sign corresponding to the sample is decoded.However, in a case where the decoding is terminated immediately when anambiguity error occurs in a sign value, a sign of the previously decodednon-zero sample is unknown. Therefore, when the decoding is terminatedin the sign value, the previously decoded sample is set to 0 and thedecoding is terminated.

FIG. 7 is a flowchart illustrating a method of arithmetic decoding ofBSAC scalable audio data according to another embodiment of the presentgeneral inventive concept.

First, when a bitstream having a predetermined target bitrate is input(operation 700), the number of available layers of the BSAC audio datais calculated by referring to the target bitrate (operation 710). Then,it is checked whether the BSAC audio data layer to be decoded is thelast layer (operation 720). When the BSAC audio data layer to be decodedis not the last layer, BSAC arithmetic decoding is performed (operation730).

When the BSAC audio data to be decoded is the last layer, it is checkedwhether all side information of the last layer is decoded (operation740). When all the side information of the last layer is decoded, BSACsmart decoding is performed (operation 750), and then, the decoding isterminated (END). When all the side information of the last layer is notdecoded, the decoding of the last layer is terminated (END).

When BSAC smart decoding by the smart decoder is performed usinginformation to be read after the truncated bitstream, it is checkedwhether the symbol to be decoded can be determined regardless of thedata read after a truncated bitstream. When the decoding can beperformed regardless of the data read after the truncated bitstream,there is no ambiguity and the decoding is continued. When a symbol to bedecoded is determined to be dependent on the data read after thetruncated bitstream, it is determined that an ambiguity occurs and thedecoding is terminated.

A sign bit is decoded as follows. When the symbol to be decoded isdetermined to be dependent on the data read after the truncatedbitstream, it is determined that an ambiguity occurs. Then, when theambiguity occurs with respect to the sign bit, the previously decodedsample is set to 0 and the decoding is terminated.

FIG. 8 is a flowchart illustrating an example of the BSAC smart decodingof operation 750. First, a symbol to be decoded is determined in anarithmetically coded scalable bitstream (operation 800), and aprobability of the determined symbol is estimated (operation 810).

The symbol is arithmetically decoded using the symbol and the estimatedprobability (operation 820). Then, K, wherein K is equal to the rightside values of Inequalities 1 and 2, is calculated. When K is between 0and 2^(dummy)−1 (operation 830), it is determined that an ambiguityoccurs, and the arithmetic decoding is terminated (operation 840).

When K is equal to or less than 0 (operation 850), the symbol is decodedinto 0, and when K is equal to or greater than 2^(dummy)−1 (operation855), the symbol is decoded into 1 (operation 870).

FIG. 9 illustrates an example in which additional decoding is performedby using a method of determining whether arithmetic decoding of ascalable BSAC bitstream is continuously performed or terminated. Asillustrated in FIG. 9, six samples are additionally decoded.

In MPEG-4 BSAC decoding, a first non-zero sample among values on thebitplane is decoded and a sign corresponding to the sample is decoded.However, in a case where the decoding is terminated immediately when anambiguity error occurs in a sign value, a sign of a previously decodednon-zero sample is unknown. Therefore, when the decoding is terminatedin the sign value, the previously decoded sample is set to 0 and thedecoding is terminated.

FIG. 10 illustrates an example of a process performed when an ambiguityoccurs in a sign bit.

The arithmetic decoding of a BSAC bitstream according to an embodimentof the present general inventive concept is an effective method ofdecoding an intermediate layer corresponding to a given target bitrate.This is based on the fact that meaningful information is still includedin the decoding buffer even though there are not bits in the decodingbuffer. The decoding is continued to a point where the ambiguity doesnot exist. The following pseudo code shows an algorithm to detect anambiguity in an arithmetic decoding module. A variable num_dummy_bitsdenotes a number of bits which are not in a value buffer due totruncation.

int ambiguity_check(int freq) /* if there is no ambiguity, returns 1 *//* otherwise, returns 0 */ upper = 1<<num_dummy_bits; decisionVal =((high−low)*freq>>PRE_SHT)−value+low−1; if(decisionVal>upper ∥decisionVal<0) return 0; else return 1;

In order to prevent a sign bit error, a spectral value of a currentspectral line is set to 0 when the ambiguity occurs while the sign bitis decoded. In the arithmetic decoding according to the embodiment ofthe present general inventive concept, all index variables are obtainedfrom a previous arithmetic decoding process.

The general inventive concept can also be embodied as computer readablecodes on a computer readable recording medium. The computer readablerecording medium is any data storage device that can store data whichcan be thereafter read by a computer system. Examples of the computerreadable recording medium include read-only memory (ROM), random-accessmemory (RAM), CD-ROMs, magnetic tapes, floppy disks, and optical datastorage devices, and carrier waves (such as data transmission throughthe Internet). The computer-readable recording medium can also bedistributed over network-coupled computer systems so that thecomputer-readable code is stored and executed in a distributed fashion.Also, functional programs, codes, and code segments to accomplish thepresent general inventive concept can be easily construed by programmersskilled in the art to which the present general inventive conceptpertains. For example, the method illustrated in FIGS. 7 and 8 can bestored in the computer-recorded medium in a form of computer-readablecodes to perform the method when the computer reads thecomputer-readable codes of the recording medium.

According to the methods and devices to arithmetically decode scalableBSAC audio data, byte level scalability can be provided in a MPEG-4 BSACdecoder. The decoding methods are effective in intermediate layers evenat low transmission rates. Even though the bitstream is truncated, thedecoding termination time can be known, and additional decoding withrespect to a truncated portion of the bitstream can be performed.

Although various embodiments of the present general inventive concepthave been illustrated and described, it will be appreciated by thoseskilled in the art that changes may be made in these embodiments withoutdeparting from the principles and spirit of the general inventiveconcept, the scope of which is defined in the appended claims and theirequivalents.

1. A method of arithmetic decoding of scalable BSAC (bit slicedarithmetic coding) audio data, the method comprising: checking whetherall side information of a last layer of the BSAC audio data is decoded;and performing BSAC smart decoding and terminating the decoding when allthe side information of the last layer is decoded, and terminating thedecoding of the last layer when all the side information of the lastlayer is not decoded, wherein the BSAC smart decoding comprises:checking whether a symbol to be decoded can be determined regardless ofdata read after a truncated bitstream; continuing decoding when decodingcan be performed regardless of the data read after the truncatedbitstream; and determining that an ambiguity occurs and terminating thedecoding, when the symbol to be decoded is determined to be dependent onthe data read after the truncated bitstream.
 2. The method of claim 1,wherein the BSAC smart decoding further comprises: performing arithmeticdecoding using a symbol to be decoded and a probability of the symbol;decoding the symbol into 1 by calculating K and determining whether K isequal to or greater than 2^(dummy)−1, wherein K is equal to right sidevalues of Inequalities 1 and 2, and otherwise, decoding the symbol into0 when K is equal to or less than 0, $\begin{matrix}{{v\; 2} < {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 1} \\{{v\; 2} \geq {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 2}\end{matrix}$ wherein, v1 is a valid bitstream value remaining aftertruncation, v2 is a bitstream value truncated after truncation, dummy isa number of bits of the value v2, freq is a probability value of thesymbol, high and low are upper and lower ends of a range in which theprobability value of the symbol exists; and stopping the decoding bydetermining that the ambiguity occurs when the value K is between 0 and2^(dummy)−1.
 3. The method of claim 1, wherein the determining that theambiguity occurs and terminating the decoding comprises: determiningthat the ambiguity occurs when the symbol to be decoded is determined tobe dependent on the data read after the truncated bitstream; and settinga previously decoded sample to 0 and terminating the decoding when it isdetermined that the ambiguity occurs with respect to a sign bit.
 4. Themethod of claim 1, wherein the checking whether all side information isto be decoded comprises: calculating a number of available layers of theBSAC audio data by referring to a target bitrate; and checking whether aBSAC audio data layer to be decoded is the last layer and performingBSAC arithmetic decoding when the BSAC audio data layer to be decoded isnot the last layer.
 5. A method of arithmetically decoding scalable BSAC(bit sliced arithmetic coding) audio data, the method comprising:determining whether a BSAC audio data layer to be decoded is a lastlayer and performing BSAC arithmetic decoding when the BSAC audio datalayer to be decoded is not the last layer; checking whether all sideinformation of a last layer of the BSAC audio data is decoded when theBSAC audio data layer to be decoded is determined to be the last layer;and performing BSAC smart decoding and then terminating the decodingwhen all the side information of the last layer is decoded, otherwiseterminating the decoding of the last layer when all the side informationof the last layer is not decoded.
 6. The method of claim 5, whereinperforming the BSAC smart decoding comprises: arithmetically decoding asymbol of the BSAC audio data; determining a probability of the symbol;determining if an ambiguity occurs in the arithmetically decoded symbolbased on the probability of the symbol; stopping decoding if anambiguity is determined to occur; and determining a symbol value to be 1or 0 if an ambiguity is determined not to occur.
 7. A method of decodinga bitstream of BSAC (bit sliced arithmetic coding) audio data, themethod comprising: determining whether all side information of thebitstream of BSAC audio data is decoded; smart decoding the bitstream ofBSAC audio data when all the side information is decoded, the smartdecoding comprising: arithmetically decoding a symbol of the bitstream;determining a probability of the symbol; determining if an ambiguityoccurs in the arithmetically decoded bitstream symbol based on theprobability of the symbol; stopping decoding if an ambiguity isdetermined to occur; and determining a bitstream symbol value if anambiguity is determined not to occur.
 8. The method of claim 7, whereinthe smart decoding further comprises: determining the bitstream symbolvalue to be a value of 0 or 1 based on the probability of the symbol andadditional bitstream information.
 9. The method of claim 8, wherein theadditional bitstream information comprises information of a number ofdummy bits in the BSAC data.
 10. A device to arithmetically decodescalable BSAC (bit sliced arithmetic coding) audio data, the devicecomprising: a side information checker to check whether all sideinformation of a last layer of the BSAC audio data is decoded; a smartdecoder to perform BSAC smart decoding and to terminate the decodingwhen all the side information of the last layer is decoded; and adecoding terminator to terminate the decoding of the last layer when allthe side information of the last layer is not decoded, wherein the BSACsmart decoding of the smart decoder continues the decoding when a symbolto be decoded can be decoded regardless of the data read after atruncated bitstream by checking whether the symbol to be decoded isdetermined regardless of data read after the truncated bitstream, andotherwise, terminates the decoding by determining that an ambiguityoccurs when the symbol to be decoded is determined to be dependent onthe data read after the truncated bitstream.
 11. The device of claim 10,wherein the smart decoder comprises: a symbol decoder to performarithmetic decoding using the symbol to be decoded and a probability ofthe symbol; an ambiguity checker to check whether the ambiguity occursby calculating K, wherein K is equal to right side values ofInequalities 1 and 2; an additional decoder to decode the symbol into 1,when K is equal to or greater than 2^(dummy)−1, and otherwise, decodingthe symbol into 0, when K is equal to or less than 0, $\begin{matrix}{{v\; 2} < {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 1} \\{{v\; 2} \geq {\frac{( {{high} - {low} + 1} ) \cdot {freq}}{2^{14}} - {v\; 1} + {low} - 1}} & {{Inequality}\mspace{14mu} 2}\end{matrix}$ wherein, v1 is a valid bitstream value remaining aftertruncation, v2 is a bitstream value truncated after truncation, dummy isa number of bits of the value v2, freq is a probability value of thesymbol, high and low are upper and lower ends of a range in which theprobability value of the symbol exists; and a decoding stopper to stopthe decoding by determining that the ambiguity occurs, when K is between0 and 2^(dummy)−1.
 12. The device of claim 11, wherein the decodingstopper determines that the ambiguity occurs, when K is between 0 and2^(dummy)−1, and sets a previously decoded sample to
 0. 13. The deviceof claim 11, further comprising: a layer number calculator to calculatea number of available layers of the BSAC audio data by referring to atarget bitrate; a last layer checker to check whether the BSAC audiodata layer to be decoded is the last layer; and a BSAC arithmeticdecoder performing BSAC arithmetic decoding when the BSAC audio datalayer is not the last layer based on the checking result.
 14. Acomputer-readable recording medium having embodied thereon a computerprogram to execute a method of arithmetic decoding of scalable BSAC (bitsliced arithmetic coding) audio data, the method comprising: checkingwhether all side information of a last layer of the BSAC audio data isdecoded; and performing BSAC smart decoding and terminating the decodingwhen all the side information of the last layer is not decoded, andterminating the decoding of the last layer when all the side informationof the last layer is decoded, wherein the BSAC smart decoding comprises:checking whether a symbol to be decoded can be determined regardless ofdata read after a truncated bitstream; continuing decoding when decodingcan be performed regardless of the data read after the truncatedbitstream; and determining that an ambiguity occurs and terminating thedecoding, when the symbol to be decoded is determined to be dependent onthe data read after the truncated bitstream.
 15. A computer-readablerecording medium having embodied thereon a computer program to execute amethod of decoding of BSAC (bit sliced arithmetic coding) audio data,the method comprising: determining whether a BSAC audio data layer to bedecoded is a last layer and performing BSAC arithmetic decoding when theBSAC audio data layer to be decoded is not the last layer; checkingwhether all side information of a last layer of the BSAC audio data isdecoded when the BSAC audio data layer to be decoded is determined to bethe last layer; and performing BSAC smart decoding and then terminatingthe decoding when all the side information of the last layer is decoded,and otherwise terminating the decoding of the last layer when all theside information of the last layer is not decoded.